<%-- 
    Document   : header
    Created on : Dec 18, 2013, 3:03:13 PM
    Author     : Administrator
--%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Cung on bai</title>
        <link rel="stylesheet" type="text/css" href="/cungonbai/bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="/cungonbai/bootstrap/css/color.css">
        <link rel="stylesheet" type="text/css" href="/cungonbai/css/mycss.css">
        <link rel="icon" type="image/x-icon" href="/cungonbai/image/logo.png">
        <script src="/cungonbai/js/jquery-1.10.2.min.js" type="text/javascript"></script>
        <script src="/cungonbai/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            function clickCaret(){
                if($(".user .dropdown-menu").hasClass("show")){
                    $(".user .dropdown-menu").removeClass("show");
                }else{
                    $(".user .dropdown-menu").addClass("show");
                }
            }
        </script>
    </head>
    <body>
        <header>
            <div class="container">
                <div class="row logo-user">
                    <div><a href="#"><img src="/cungonbai/image/banner_600.png" class="logo"></a></div>
                    <div class="user">
                        <!-- <div>Welcome <a href="#" class="welcome">Guest</a></div> -->
                        <c:choose>
                            <c:when test="${not empty sessionScope.USER}">
                                <div class="dropdown" style="float: right"><label style="color: #8a6d3b;">Xin chào</label> 
                                    <a href="User?action=ProfilePage" class="welcome btn btn-warning btn-xs">${sessionScope.USER.fullName}</a>
                                    <span onclick="clickCaret()" class="btn btn-warning btn-xs caret-click">
                                        <b class="caret"></b>
                                    </span>
                                    <ul class="dropdown-menu hide" style="margin-left: 55px;">
                                        <li><a href="#">Tin nhắn</a></li>
                                        <li><a href="User?action=ProfilePage">Tùy chỉnh</a></li>
                                        <li><a href="User?action=ProfilePage">Đổi mật khẩu</a></li>
                                        <li><a href="User?action=Logout">Đăng xuất</a></li>
                                    </ul>
                                </div>
                            </c:when>
                            <c:otherwise>
                                <div>
                                    <div class="reg-log">
                                        <a href="User?action=LoginPage" class="btn btn-sm btn-login">Đăng Nhập</a>
                                        <a href="User?action=RegisterPage" class="btn btn-sm btn-register">Đăng Ký</a>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            </c:otherwise>
                        </c:choose>
                    </div>
                </div>
                <div class="row">
                    <nav class="navbar navbar-orange" role="navigation">
                        <!-- Brand and toggle get grouped for better mobile display -->
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand navbar-home" href="#"><span class="glyphicon glyphicon-home"></span></a>
                        </div>

                        <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                                <li class="active"><a href="#">Giải Đề</a></li>
                                <li><a href="#">Hỏi Đáp</a></li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle">Tài Nguyên <b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">Môn học</a></li>
                                        <li><a href="#">Đề thi</a></li>
                                        <li><a href="#">Bài kiểm tra</a></li>       
                                    </ul>

                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle">Trợ Giúp <b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">Trợ giúp</a></li>
                                        <li><a href="#">Đề thi</a></li>
                                        <li><a href="#">Bài kiểm tra</a></li>
                                    </ul>
                                </li>
                                <li><a href="#">Về chúng tôi</a></li>
                            </ul> 
                        </div>
                    </nav>
                </div>
            </div>
        </header>
